﻿using System;
using System.Collections;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.SessionState;
using Rison.BusinessFacade.Common;

namespace Rison.Web.ZJCP.ashx
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class load_admin : IHttpHandler, IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            if (!CurrentLoginedUser.Logined)
            {
                context.Response.Write("$(function(){location.href = '/Login.aspx'});");
            }
            else
            {
                context.Response.Write(String.Format("$(function(){{$('#true_name').html('{0}');}});", CurrentLoginedUser.UserName));
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
